/*
	ViewOptions.h
	(c)2000 Palestar, Richard Lyle
*/

#ifndef VIEWOPTIONS_H
#define VIEWOPTIONS_H

#include "System/Messages.h"
#include "Gui3d/WindowView.h"



//----------------------------------------------------------------------------

class ViewOptions : public WindowView::View
{
public:
	DECLARE_WIDGET_CLASS();

	// Types
	typedef Reference< ViewOptions >	Ref;

	// Construction
						ViewOptions();
	// View interface
	void				onActivate();
	void				onDeactivate();
	void				onUpdate( float t );
	bool				onMessage( const Message & msg );
	void				onDocumentUpdate();

	// {{BEGIN_DATA
	WindowText *				m_pTextRemap;
	NodeWindow *				m_pDialogRemap;
	WindowList *				m_pListKeys;
	NodeWindow *				m_pKeyboardOptions;
	WindowText *				m_pAudioOptions;
	WindowText *				m_pColorOptions;
	WindowButton *				m_pButtonColors;
	WindowButton *				m_pButtonKeyboard;
	WindowText *				m_pTextSoundVolume;
	WindowText *				m_pTextMusicVolume;
	// END_DATA}}

	// {{BEGIN_MSG
	bool				onButtonCancelRemap(const Message & msg);
	bool				onButtonRemapKey(const Message & msg);
	bool				onButtonResetKeys(const Message & msg);
	bool				onButtonColors(const Message & msg);
	bool				onButtonKeyboard(const Message & msg);
	bool				onButtonBack(const Message & msg);
	bool				onButtonSoundDown(const Message & msg);
	bool				onButtonSoundUp(const Message & msg);
	bool				onButtonMusicDown(const Message & msg);
	bool				onButtonMusicUp(const Message & msg);
	bool				onButtonBackDown(const Message & msg);
	bool				onButtonBackUp(const Message & msg);
	bool				onButtonBorderDown(const Message & msg);
	bool				onButtonBorderUp(const Message & msg);
	// END_MSG}}

	int					m_BorderIndex;
	int					m_BackIndex;

	dword				m_KeyRemap;

	static void			updateColors( NodeWindow * pWindow, Color border, Color background );
	void				updateKeyList();
};

//----------------------------------------------------------------------------



#endif

//----------------------------------------------------------------------------
// EOF
